import Vue from 'vue'
import Vuex from 'vuex'
import VuexPersistence from 'vuex-persist'
import user from './modules/user'
import menu from './modules/menu'
import getters from './getters'
import  tree from './modules/tree'
import  building from './modules/building'

Vue.use(Vuex)
const vuexLocal = new VuexPersistence({
  storage: window.localStorage
})
export default new Vuex.Store({
  state: {
  },
  getters: {
    ...getters
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    user,
    menu,
    tree,
    building
  },
  
  plugins: [vuexLocal.plugin] 
})
